/**
 * FileName: AbstractDb.cpp
 * Author:   kqbi
 * Date:     2019.7.12
 * Des:      �豸��Ϣ
 */

#include "AbstractDb.h"
#include "Utils/Logger.h"
#include "json/json.h"

AbstractDb::PlateInfoRecord::PlateInfoRecord() : _iD(""), _plateName(""), _plateType(""), _confidence(0.0), _fullPath(""),
                                                 _platePath(""),
                                                 _createTime("") {

}

AbstractDb::PlateInfoRecord::~PlateInfoRecord() {

}

AbstractDb::AbstractDb() {
}

AbstractDb::~AbstractDb() {
}

bool AbstractDb::dbEraseRecord(const Table table, const resip::Data &key, bool isSecondaryKey) {
    return true;
}

resip::Data AbstractDb::dbFirstKey(const Table table) {
    //#[ operation dbFirstKey(const Table)
    return dbNextKey(table, true/*first*/);
    //#]
}

AbstractDb::Key AbstractDb::firstDeviceInfoKey() {
    //#[ operation firstChannelInfoKey()
    return dbFirstKey(PlateInfoTable);
    //#]
}

AbstractDb::Key AbstractDb::nextDeviceInfoKey() {
    //#[ operation nextChannelInfoKey()
    return dbNextKey(PlateInfoTable);
    //#]
}

int AbstractDb::AddPlateInfo(std::string &plateName, std::string &plateType, float confidence, std::string &fPath,
                             std::string &pPath,
                             std::string &time) {
    return 0;
}

void AbstractDb::QueryPlateInfoListSum(const std::string &startTime, const std::string &endTime, int &sum) {

}

void AbstractDb::QueryPlateInfoList(int startNum, int endNum, const std::string &startTime, const std::string &endTime,
                                    std::vector<AbstractDb::PlateInfoRecord> &plateInfoRecordList) {

}